//
//  Head_2TableViewCell.m
//  ThePrivateKitchen
//
//  Created by lirui on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com蓝鸥科技. All rights reserved.
//

#import "Head_2TableViewCell.h"

@implementation Head_2TableViewCell
- (void)dealloc
{
    [_img release];
    [_name release];
    [_content release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _img =[[ UIImageView alloc] init];
        //_img.backgroundColor = [ UIColor yellowColor];
        [self.contentView addSubview:_img];
        [_img release];
        self.name = [[UILabel alloc] init];
        //_name.backgroundColor = [ UIColor redColor];
        [self.contentView addSubview:_name];
        [_name release];
        _name.textAlignment = NSTextAlignmentCenter;
        self.content = [[ UILabel alloc] init];
       // _content.backgroundColor = [ UIColor greenColor];
        [self.contentView addSubview:_content];
        [_content release];
        _content.font = [ UIFont systemFontOfSize:13];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(10 * WIDTH, HEIGHT*10, WIDTH *375 - 20*WIDTH ,HEIGHT * 150);
    _name.frame= CGRectMake(10 * WIDTH, _img.frame.origin.y + _img.frame.size.height, _img.frame.size.width, 20 *HEIGHT);
    _content.frame = CGRectMake(10 *WIDTH, _name.frame.origin.y +_name.frame.size.height, _name.frame.size.width, 20 *HEIGHT);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
